from apscheduler.schedulers.background import BackgroundScheduler
from django_apscheduler.jobstores import DjangoJobStore,register_job,register_events
import datetime
#前台进程模块
from apscheduler.schedulers.blocking import BlockingScheduler
from resources.qcloud.cvm import getCvmList

#scheduler = BackgroundScheduler()
scheduler = BlockingScheduler()
scheduler.add_jobstore(DjangoJobStore(),"default")

@register_job(scheduler,"interval",seconds=10)
def syncQcloud():
    getCvmList()

register_events(scheduler)
